from draw_func import draw_map
from draw_func import draw_pie
from draw_func import draw_bar
import pandas as pd

if __name__ == '__main__':
    # 分析 starbucks
    data1 = pd.read_csv(r"starbucks.csv")
    # 删去不要的列
    data1.drop(columns=['Brand', 'Store Number', 'Store Name',
                        'Street Address', 'Postcode', 'Phone Number', 'Timezone'])
    draw_map(data1, 'starbuck')
    draw_bar(data1, 'City', 'starbuck')
    draw_bar(data1, 'State/Province', 'starbuck')
    draw_pie(data1, 'Ownership Type', 'starbuck')
    draw_pie(data1, 'Country', 'starbuck')

    # 分析 911
    data2 = pd.read_csv(r"911.csv")
    draw_map(data2, '911')
    draw_bar(data2, 'title', '911')
    draw_bar(data2, 'twp', '911')
